spb/datacenterindex
Public
HTML 53.9%
TypeScript 44.5%
JavaScript 0.6%
SQL 0.5%
1import { api } from "@/lib/api";2import { countryName, fmtInt } from "@/lib/format";3import { OG_CONTENT_TYPE, OG_SIZE, renderOg } from "@/lib/og-template";45export const alt = "DataCenterIndex internet exchange";6export const size = OG_SIZE;7export const contentType = OG_CONTENT_TYPE;8export const revalidate = 3600;910export default async function Image({ params }: { params: Promise<{ slug: string }> }) {11 const { slug } = await params;12 const r = await api.ixp(slug);13 if (!r.ok) return renderOg({ eyebrow: "Internet exchange", title: "DataCenterIndex internet exchanges", subtitle: "Exchange points, connected networks and the facilities where they are present." });14 const d = r.data;15 const country = d.countryName ?? (d.countryIso2 ? countryName(d.countryIso2) : null);16 return renderOg({17 eyebrow: "Internet exchange",18 title: d.name,19 subtitle: [d.nameLong && d.nameLong !== d.name ? d.nameLong : null, [d.city, country].filter(Boolean).join(", ")].filter(Boolean).join(" · ") || undefined,20 stats: [21 { label: "Networks", value: d.networkCount === null ? "—" : fmtInt(d.networkCount) },22 { label: "Facilities", value: fmtInt(d.facilityCount) },23 { label: "Country", value: country ?? "—" },24 ],25 });26}27